    FILE: MODDOC2:MODEM      HEWLETT-PACKARD: Z80 Assembler 				       Tue,  9 Oct 1984, 11:27     Page   1

          1				;^Z80^
          2	  0000'			TERMINAL:
          3				                EXTERNAL  BELL,CD_STAT,KBSTAT,KBREAD,KEYCLICK,CHR_OUT
          4				                EXTERNAL  U_STAT,CHR_IN,HANDLE_CHAR
          5				; init the screen and stuff
          6	  0000'	CD 0000#	                CALL    BELL
          7	  0003'			MAIN_LOOP:
          8				; see if we're still online
          9	  0003'	CD 0000#	                CALL    CD_STAT
         10	  0006'	CA 2600'	                JP      Z,CARRIER_LOST
         11				;
         12	  0009'	CD 0000#	                CALL    KBSTAT
         13	  000C'	B7		                OR      A
         14	  000D'	28 09		                JR      Z,MAIN_1        ; No char yet
         15	  000F'	CD 0000#	                CALL    KBREAD
         16				;
         17	  0012'	CD 0000#	                CALL    KEYCLICK
         18	  0015'	CD 0000#	                CALL    CHR_OUT       ; Send out to modem
         19				; Get a key from modem
         20	  0018'			MAIN_1:
         21	  0018'	CD 0000#	                CALL    U_STAT
         22	  001B'	28 06		                JR      Z,NO_CHAR_PRESENT ; No characters today
         23	  001D'	CD 0000#	                CALL    CHR_IN          ; Read it
         24	  0020'	CD 0000#	                CALL    HANDLE_CHAR     ; Out to screen
         25	  0023'			NO_CHAR_PRESENT:
         26	  0023'	C3 0300'	                JP      MAIN_LOOP       ; More abuse
         27				;
         28				;
         29	  0026'			CARRIER_LOST:
         30	  0026'	C9		                RET                     ; Time to go away now.

         0 Error(s) Detected.    39 Program Bytes.
        14 Symbols Detected.

    FILE: MODDOC2:MODEM      HEWLETT-PACKARD: Z80 Assembler 				       Tue,  9 Oct 1984, 11:27     Page   2

    Value	Symbol		Defined 	Referenced:

    0000# BELL			     3     6
    0026' CARRIER_LOST	    29	    10
    0000# CD_STAT			     3     9
    0000# CHR_IN			     4    23
    0000# CHR_OUT			     3    18
    0000# HANDLE_CHAR		     4    24
    0000# KBREAD			     3    15
    0000# KBSTAT			     3    12
    0000# KEYCLICK			     3    17
    0018' MAIN_1		    20	    14
    0003' MAIN_LOOP		     7	    26
    0023' NO_CHAR_PRESENT	    25	    22
    0000' TERMINAL		     2
    0000# U_STAT			     4    21
    0026 CARRIER_LOST
    0018 MAIN_1
    0003 MAIN_LOOP
    0023 NO_CHAR_PRESENT
    0000 TERMINAL